@8btc/mditor 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vditor v0.0.22 - A markdown editor written in TypeScript.
2
+ * Vditor v0.0.1 - A markdown editor written in TypeScript.
3
3
  *
4
4
  * MIT License
5
5
  *
@@ -25,7 +25,7 @@
25
25
  *
26
26
  */
27
27
  /*!
28
- * Vditor v0.0.22 - A markdown editor written in TypeScript.
28
+ * Vditor v0.0.1 - A markdown editor written in TypeScript.
29
29
  *
30
30
  * MIT License
31
31
  *
@@ -1084,7 +1084,7 @@
1084
1084
  fill: currentColor;
1085
1085
  }
1086
1086
  .vditor-linenumber {
1087
- padding-left: calc(4em + 20px) !important;
1087
+ padding-left: 4em !important;
1088
1088
  position: relative;
1089
1089
  }
1090
1090
  .vditor-linenumber__rows {
@@ -1811,8 +1811,8 @@
1811
1811
  }
1812
1812
  .vditor--linenumber .vditor-reset {
1813
1813
  counter-reset: linenumber;
1814
- padding-left: calc(4em + 20px);
1815
- /* 行号栏位 + 额外 20px 左间距 */
1814
+ padding-left: 4em;
1815
+ /* 预留固定左侧行号栏位 */
1816
1816
  }
1817
1817
  .vditor--linenumber .vditor-reset > ul::before,
1818
1818
  .vditor--linenumber .vditor-reset ol::before {
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vditor v0.0.22 - A markdown editor written in TypeScript.
2
+ * Vditor v0.0.1 - A markdown editor written in TypeScript.
3
3
  *
4
4
  * MIT License
5
5
  *
@@ -2791,7 +2791,7 @@ var Vditor = /** @class */ (function () {
2791
2791
  /* harmony export */ "H": () => (/* binding */ _VDITOR_VERSION),
2792
2792
  /* harmony export */ "g": () => (/* binding */ Constants)
2793
2793
  /* harmony export */ });
2794
- var _VDITOR_VERSION = "0.0.22";
2794
+ var _VDITOR_VERSION = "0.0.1";
2795
2795
 
2796
2796
  var Constants = /** @class */ (function () {
2797
2797
  function Constants() {
@@ -3093,7 +3093,7 @@ var Constants = /** @class */ (function () {
3093
3093
  "c#",
3094
3094
  "bat",
3095
3095
  ];
3096
- Constants.CDN = "https://webcdn.wujieai.com/vditor@".concat("0.0.22");
3096
+ Constants.CDN = "https://webcdn.wujieai.com/vditor@".concat("0.0.1");
3097
3097
  Constants.MARKDOWN_OPTIONS = {
3098
3098
  autoSpace: false,
3099
3099
  gfmAutoLink: true,
@@ -8510,13 +8510,17 @@ var setPadding = function (vditor) {
8510
8510
  var padding = (vditor.wysiwyg.element.parentElement.clientWidth -
8511
8511
  vditor.options.preview.maxWidth) /
8512
8512
  2;
8513
- vditor.wysiwyg.element.style.padding = "10px ".concat(Math.max(minPadding, padding), "px");
8513
+ var basePad = Math.max(minPadding, padding);
8514
+ var leftExtra = vditor.options.lineNumber && basePad < 40 ? 20 : 0;
8515
+ vditor.wysiwyg.element.style.padding = "10px ".concat(basePad, "px 10px ").concat(basePad + leftExtra, "px");
8514
8516
  }
8515
8517
  if (vditor.ir.element.parentElement.style.display !== "none") {
8516
8518
  var padding = (vditor.ir.element.parentElement.clientWidth -
8517
8519
  vditor.options.preview.maxWidth) /
8518
8520
  2;
8519
- vditor.ir.element.style.padding = "10px ".concat(Math.max(minPadding, padding), "px");
8521
+ var basePad = Math.max(minPadding, padding);
8522
+ var leftExtra = vditor.options.lineNumber && basePad < 40 ? 20 : 0;
8523
+ vditor.ir.element.style.padding = "10px ".concat(basePad, "px 10px ").concat(basePad + leftExtra, "px");
8520
8524
  }
8521
8525
  if (vditor.preview.element.style.display !== "block") {
8522
8526
  vditor.toolbar.element.style.paddingLeft =